<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
	<%
	StringBuffer strURL = request.getRequestURL();
	String URL = strURL.toString();
	String contPath = request.getContextPath();
	int nIndex = URL.indexOf(contPath);
	URL = "http://tugo.cn/weixin_aef/";
	%>
<html>

<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta content="always" name="referrer">
<meta charset="utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<!-- 移动端必须的设置 -->
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<!-- 禁用电话号码检测功能，禁止对数字随便可以拨号 -->
<meta name="format-detection" content="telephone=no">
<!-- 禁用E-mail检测功能 -->
<meta name="format-detection" content="email=no">
<!-- 禁用地址检测功能，禁止跳转到地图 -->
<meta name="format-detection" content="address=no">
<!-- 在苹果设备上以全屏方式打开本网页 -->
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- 设置在苹果设备上状态的颜色，默认白色，要设置成什么颜色以Web颜F色的风格而定 -->
<meta name="apple-mobile-web-app-status-bar-style" content="white">
<link rel="stylesheet" href="<%=URL%>newedition/css/aui.css" />
<link rel="stylesheet" href="<%=URL%>newedition/css/iconfont.css" />
<link rel="stylesheet" href="<%=URL%>newedition/css/aui-slide.css" />
<link rel="stylesheet"
	href="<%=URL%>newedition/css/user_infoWorker.css" />
<link rel="stylesheet"
	href="<%=URL%>newedition/css/aui-pull-refresh.css" />
<script type="text/javascript"
	src="<%=URL%>newedition/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript"
	src="<%=URL%>newedition/js/aui-slide.js"></script>
<script type="text/javascript" src="<%=URL%>js/base64.js"></script>
<script type="text/javascript"
	src="<%=URL%>newedition/js/aui-toast.js"></script>
<script type="text/javascript"
	src="<%=URL%>newedition/js/auipopupstyle.js"></script>
<script type="text/javascript"
	src="<%=URL%>newedition/js/base.js?version=3.4"></script>
<script type="text/javascript"
	src="<%=URL%>js/cookies.js?version=1.1"></script>
<script type="text/javascript"
	src="<%=URL%>newedition/js/aui-pull-refresh.js"></script>
<script type="text/javascript"
	src="<%=URL%>newedition/js/doRefresh.js"></script>
<script type="text/javascript"
	src="<%=URL%>newedition/js/aui-dialog.js"></script>
<script type="text/javascript" src="<%=URL%>js/doT.min.js"></script>
<title>收油人员资料信息</title>
		<style>
			.star{
				font-size: 0.4rem !important;
				color: #ffb600;
			}
		</style>
	</head>

	<body>
		<div class="body-box aui-refresh-content">
			<div class="header-box">
				<div class="header-img">
					<span>
						<img src=""  id="hearderimg"/>
					</span>
				</div>
				<div class="header-nem aui-margin-5" id="realname">李四</div>
				<div class="header-LV">LV.5</div>
			</div>
			<div class="main01 aui-row aui-margin-b-15">
				<div class="aui-col-xs-6 main01-left">
					<div class="main01-img">
						<i class="icon iconfont icon-iconfuzhi"></i>
					</div>
					<div class="main01-title">收油总量</div>
					<div class="main-content">
						<span class="quantity" id="totalrealnum"></span>
						<span>桶</span>
					</div>
				</div>
				<div class="aui-col-xs-6 main01-right">
					<div class="main01-img">
						<i class="icon iconfont icon-star1"></i>
					</div>
					<div class="main01-title">评论得分</div>
					<div class="main-content">
						<span class="quantity" id="totalaverage"></span>
						<span>分</span>
					</div>
				</div>
			</div>
			<!--<div class="main02 aui-content-padded">
				<div class="main02-title">
					<span>综合评价</span>
				</div>
				<div class="main02-content">李四收油人员，长期在工作中认真负责，同时对待客户很有礼貌并以客户的要求为使命，很好的诠释了顾客至上的道理，得到客户广泛的好评。 希望“李四”在接下来的工作中再接再厉，继续保持对此份责任的热情。
				</div>
			</div>-->
			<div id="dotmainhtml"></div>
		<script type="template" id="dotTmpl">
			{{if(it.length!=0){ }}
				 {{ for(var i=0;i<it.length;i++){	}}	
						<div class="aui-content aui-margin-b-15">
				<ul class="aui-list aui-media-list">
					<li class="aui-list-item aui-list-item-middle">
						<div class="aui-media-list-item-inner">
							<div class="aui-list-item-media" style="width: 3rem;">
								<img src="{{=it[i].phoneheadimgurl}}" class="aui-img-round aui-list-img-sm">
							</div>
							<div class="aui-list-item-inner">
								<div class="aui-list-item-text">
									<div class="aui-list-item-title aui-font-size-14" style="color: #4e4e4e;font-size: 0.8rem!important;">{{=it[i].phonerealname}}</div>
									<div class="aui-list-item-right">{{=it[i].createdDt}}</div>
								</div>
								<div class="aui-list-item-text" style="font-size: 0.6rem;justify-content: flex-start;color: #4e4e4e;">
									<span>收油吨数</span>
									<span style="color: #ffb600;" >{{=it[i].realnum}}桶</span>
								</div>
								<div style="font-size: 0.6rem;color: #4e4e4e;padding: 0.5rem 0;">{{=it[i].four}}</div>
							</div>
						</div>
					</li>
				</ul>
			</div>
				 {{}}}
			{{}}}
		</script>
		
		</div>
	</body>
<script>
<%String phone = (String) request.getParameter("phone");%>
$(function(){
	GetSingleOpenIdForMobile( <%=phone%>);
	ordercommentall(<%=phone%>)
})
function GetSingleOpenIdForMobile(mobile) {
	showDefault("loading","加载中...");
	var json = '{"mobile": "'+mobile+'"}';
	$.ajax({
			type: "post",
			datatype: 'json',
			contentType: 'application/json;charset=UTF-8',
			url: 'http://118.178.18.0:8082/alfa-mobile-ws/rest/OpenId/GetSingleOpenIdForMobile?mobiletoken='+getCookie("mobiletokenuser")+'',
			data: json,
			success: function(data) {
				toast.hide();
				if(data.message=="1"){
					$("#realname").html(data.data.realname);
					
					if(data.data.totalaverage){
					    $("#totalrealnum").html(data.data.totalrealnum ); 
						$("#totalaverage").html((data.data.totalaverage /data.data.commentnum ).toFixed(1));
					}else{
						$("#totalaverage").html(0);
						$("#totalrealnum").html(0); 
					}
					
					$("#hearderimg").attr('src',data.data.headimgurl);
					/* $("#realname").html(data.data.rows.realname); */
				}else{
					
				}
			}
	})
}
function ordercommentall(mobile){
	showDefault("loading","加载中...");
	var jsonstr = "filterscount=0&groupscount=0&pagenum=0&pagesize=1000&recordstartindex=0&recordendindex=1000&orderId=&mobile="+mobile+"&phone=";
	$.ajax({
		cache: false,
		type: "post",
		datatype: 'json',
		contentType: 'application/json;charset=UTF-8',
		data: jsonstr,
		url: ''+httpipstr+'alfa-mobile-ws/rest/ordercomment/findlist?mobiletoken=' + getCookie("mobiletokenuser") + '',
		success: function(data) {
			toast.hide();
			var tmpl = doT.template($("#dotTmpl").html());
			// 将数据扔进templ中。并在DIV中显示出来
			$("#dotmainhtml").html(tmpl(data.rows));
		}
	})
}
	dorefresh();
</script>
</html>